package com.rxjava.simpleflatmap;

/**
 * Created by iceGeneral on 2016/10/20.
 */
public final class OnSubscribeFromArray<T> implements OnSubscribe<T> {
    final T[] array;

    public OnSubscribeFromArray(T[] array) {
    	//array -> new String[]{"flatMap" + integer, "flatMap" + 7, "flatMap" + 8}
        this.array = array;
    }

    @Override
    public void call(Subscriber<? super T> subscriber) {
    	System.out.println("step8");
    	//subscriber -> System.out.println(s);
        for (T t : array) {
            subscriber.onNext(t);
        }
    }

}
